#ifndef USERPROG_PROCESS_H
#define USERPROG_PROCESS_H

#include "threads/thread.h"
#include "threads/synch.h"
#include <list.h>

tid_t process_execute (const char *file_name);
int process_wait (tid_t);
void process_exit (void);
void process_activate (void);

struct child_process{
  tid_t tid;
  struct thread * t;
  struct semaphore wait;
  int exit_status;
  bool exit;
  bool load;
  bool waited;
  struct list_elem child_elem;
};

/* child_process helper */

struct child_process * get_child_by_tid(tid_t tid,struct thread * parent);


#endif /* userprog/process.h */
